import 'WithdrawOrderPageByTeamIdResponseDto.dart';

/// 响应主体内容
class WithdrawOrderHisPageDataWithdrawOrderPageByTeamIdResponseDto {
  /// 当前页码
  final int? pageNum;

  /// 每页个数
  final int? pageSize;

  /// 总页数
  final int? pages;

  /// 所有个数
  final int? total;

  /// 当前页结果集
  final List<WithdrawOrderPageByTeamIdResponseDto>? list;

  /// 待结账订单数量
  final int? nonSettleCount;

  /// 待结账订单金额，单位美元
  final String? nonSettleAmount;

  /// 已结账订单数量
  final int? settledCount;

  /// 已结账订单金额，单位美元
  final String? settledAmount;

  WithdrawOrderHisPageDataWithdrawOrderPageByTeamIdResponseDto({
    this.pageNum,
    this.pageSize,
    this.pages,
    this.total,
    this.list,
    this.nonSettleCount,
    this.nonSettleAmount,
    this.settledCount,
    this.settledAmount,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (pageNum != null) data['pageNum'] = pageNum;
    if (pageSize != null) data['pageSize'] = pageSize;
    if (pages != null) data['pages'] = pages;
    if (total != null) data['total'] = total;
    if (list != null) data['list'] = list!.map((e) => e.toJson()).toList();
    if (nonSettleCount != null) data['nonSettleCount'] = nonSettleCount;
    if (nonSettleAmount != null) data['nonSettleAmount'] = nonSettleAmount;
    if (settledCount != null) data['settledCount'] = settledCount;
    if (settledAmount != null) data['settledAmount'] = settledAmount;
    return data;
  }

  factory WithdrawOrderHisPageDataWithdrawOrderPageByTeamIdResponseDto.fromJson(
    Map<String, dynamic> json,
  ) {
    return WithdrawOrderHisPageDataWithdrawOrderPageByTeamIdResponseDto(
      pageNum: json['pageNum'],
      pageSize: json['pageSize'],
      pages: json['pages'],
      total: json['total'],
      list: json['list'] != null
          ? List<WithdrawOrderPageByTeamIdResponseDto>.from(
              json['list'].map(
                (x) => WithdrawOrderPageByTeamIdResponseDto.fromJson(x),
              ),
            )
          : [],
      nonSettleCount: json['nonSettleCount'],
      nonSettleAmount: json['nonSettleAmount'],
      settledCount: json['settledCount'],
      settledAmount: json['settledAmount'],
    );
  }
}
